package io.github.util;

/**
 * @Author: Max
 * @Date: 2019/10/9 18:52
 */

public class RegexUtils {

    /**
     *
     * @param number  用户输入的内容
     * @param regex   数据库中的规则
     * @return
     */
    public static void match(String number,String regex){
        regex = regex.replaceAll("X","\\\\d{1}");
        regex = regex.replaceAll("N","\\\\d[2-9]");
        regex = regex.replaceAll("Z","\\\\d[1-9]");
        regex = regex.replaceAll("\\.","*");
        regex = regex.replaceAll("\\!","\\$");


    }
}
